-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
API/DEPR: replace kwarg "pat" with "sep" in str.[r]partition #23767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hello @h-vetinari! Thanks for submitting the PR.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment otherwise lgtm
@@ -2410,8 +2410,11 @@ def rsplit(self, pat=None, n=-1, expand=False): | |||
|
|||
Parameters | |||
---------- | |||
pat : str, default whitespace | |||
sep : str, default whitespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's still keep pat
documented but with a deprecated
directive
String to split on. | ||
pat : str, default whitespace | ||
.. deprecated:: 0.24.0 | ||
Use ``sep`` instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Do we need a newline after this or does it render OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this directive recently in https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.astype.html, and then took the code from:
Line 4916 in 0409521
.. deprecated:: 0.20.0 |
IOW, should be fine. :)
Failure is a flaky hypothesis test. |
thanks @h-vetinari |
git diff upstream/master -u -- "*.py" | flake8 --diff